package io.bdmc.modules.bss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author huanglu
 * @since 2019-01-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SmkHeartbeat extends Model<SmkHeartbeat> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "heart_id", type = IdType.AUTO)
    private Long heartId;

    private Long devId;

    private String dataDetail;

    private String rawData;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime dataTime;

    private String dataType;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createDate;

    private String oid;

    private String online;

    private String heartbeat;

    private String selfCheck;

    private String batteryPower;

    private String signalStrength;

    private String signalSnr;

    private String signalEcl;

    private String rssi;

    private String dirtyPercent;

    private String smokeScope;

    private String reset;

    @TableField(exist=false)
    private String imei;

    @TableField(exist=false)
    private String iccid;

    @TableField(exist=false)
    private String devName;

    @TableField(exist=false)
    private String devModel;



    @Override
    protected Serializable pkVal() {
        return this.heartId;
    }

    @Override
    public String toString() {
        return "SmkHeartbeat{" +
        "heartId=" + heartId +
        ", devId=" + devId +
        ", dataDetail=" + dataDetail +
        ", dataTime=" + dataTime +
        ", dataType=" + dataType +
        ", createDate=" + createDate +
        ", oid=" + oid +
        "}";
    }
}
